﻿<!--
	@create by 
	@update by 
	@description 
-->
<div>
  <el-form-q :field-data="queryFields" :buttons="queryButtons"></el-form-q>

  <div class="yu-toolBar">
    <el-button-group>
      <el-button icon="yx-file-excel" @click="downloadFn">模板下载</el-button>
      <el-button icon="edit" @click="importFn">导入</el-button>
      <el-button icon="plus" @click="addFn">新增</el-button>
    </el-button-group>
  </div>

  <el-table-x ref="reftable" :row-index="true" :base-params="baseParams"
        :data-url="dataUrl" :table-columns="tableColumns" :request-type="'POST'"></el-table-x>

  <!-- 说明dialog可配置宽高属性，若不配置则宽度默认为屏幕50%，高度自适应 width="650px" height="380px" -->
  <el-dialog-x :title="viewTitle[viewType]" :visible.sync="dialogVisible" size="large">
    <el-form-x ref="reform" :group-fields="updateFields" :buttons="updateButtons"
           :disabled="formDisabled" label-width="80px"></el-form-x>
  </el-dialog-x>

  <el-dialog-x title="导入延案催收任务" :visible.sync="dialogImportExcelVisible" size="600px"  v-loading="loading2" element-loading-text="上传中">
    <div style="text-align: center;">
      <el-input style="width: 80%;padding-top: 20px" placeholder="请选择上传文件..." :value="fileExcelName" :disabled="true"></el-input>
    </div>

    <div class="yu-toolBar" style="text-align: center;margin-top: 20px;">
      <el-button-group>
        <file-upload
                ref="upload"
                class="el-button"
                :post-action="uploadUrl"
                :extensions="extensions"
                :data="fileData"
                :headers="headers"
                v-model="files"
                accept="application/vnd.ms-excel,application/x-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
                @input-filter="inputFilter"
                @input-file="inputFile"
                style="border-radius: 4px;background-color: #20a0ff;"
                type="primary">
          <i class="fa fa-plus"></i>
          <span style="color: #FFFFFF">选择文件</span>
        </file-upload>
        <el-button-group style="padding-left: 5px">
          <el-button style="border-radius: 4px;" type="primary" icon="upload" @click="commitFileFn">提交</el-button>
        </el-button-group>
        <el-button-group style="padding-left: 5px">
          <el-button style="border-radius: 4px;" type="primary" icon="yx-undo2" @click="cancelFn">取消</el-button>
        </el-button-group>
      </el-button-group>
    </div>
  </el-dialog-x>

</div>
